<!--
 - Author : 003.
 - Date   : 2018/9/25.
 - File   : 新建
 -->

<template>
  <div class="wrapper publish">
    <c-modal :modalTag="modalTag" :memberList="memberList" :name="currentName"></c-modal>
    <b-header></b-header>
    <div class="main-wrapper isno-left-bar">
      <div class="main-content">
        <div class="page">
          <div class="table_wrap">
            客户信息
            <div class="btn_file" style="margin-bottom:10px;">
              <div class="file_box file_box1">
                <i class="iconfont icon-Excel"></i>
                <input
                  type="file"
                  id="excel-file"
                  name="upload"
                  class="file-btn"
                  @change="exportExcel2"
                >导入
              </div>
            </div>
            <table class="table table-order table-order-hover">
              <thead>
                <tr>
                  <th>序号</th>
                  <th>名字</th>
                  <th>编号</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                <tr v-for="(item, index) in memberName" :key="index">
                  <td style="width:60px">
                    <div class="ct" style="width:50px">{{index+1}}</div>
                  </td>
                  <td>
                    <div class="ct">{{item.name}}</div>
                  </td>
                  <td>
                    <div class="ct">{{item.bianhao}}</div>
                  </td>
                  <td>
                    <div class="btn_file" style="margin-bottom:10px;">
                      <div class="file_box file_box1" @click="filterMember(item)">查看</div>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
            {{jsonList}}
          </div>
        </div>
        <div class="fixed-ico" @click="toAdd"><img src="../../assets/images/add-ico.png" alt=""></div>
      </div>
    </div>
  </div>
</template>

<script>
import XLSX from "xlsx";
import config from "../../config"
import * as axios from 'axios'

export default {
  data() {
    return {
      memberName: [
        {name: '阿洁', bianhao: '984319'},
        {name: '宝宝', bianhao: '112640'},
        {name: '不点', bianhao: '349091'},
        {name: '阿均', bianhao: '830080'}
      ],
      modalTag: false,
      memberListTmp: [
          {
              title: "苔知趣海苔夹心脆儿童即食芝麻夹心海苔罐装紫菜宝宝营养网红零食", 
              price: "14.80", 
              no: "682276931934830080", // 682276931934994349
              status: "已付款", 
              pay: "4.96", 
              fanyong: "0.67", 
              percent: "30.00%", 
              fukuan_time: "2019-10-26 21:21:49", 
              yg_souru: "1.49", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "苔知趣海苔夹心脆儿童即食芝麻夹心海苔罐装紫菜宝宝营养网红零食", 
              price: "14.80", 
              no: "682276931934830080", 
              status: "已付款", 
              pay: "4.96", 
              fanyong: "0.67", 
              percent: "30.00%", 
              fukuan_time: "2019-10-26 21:21:49", 
              yg_souru: "1.49", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "苔知趣海苔夹心脆儿童即食芝麻夹心海苔罐装紫菜宝宝营养网红零食", 
              price: "14.80", 
              no: "682276931934830080", 
              status: "已付款", 
              pay: "4.96", 
              fanyong: "0.67", 
              percent: "30.00%", 
              fukuan_time: "2019-10-26 21:21:49", 
              yg_souru: "1.49", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "苔知趣海苔夹心脆儿童即食芝麻夹心海苔罐装紫菜宝宝营养网红零食", 
              price: "14.80", 
              no: "682276931934830080", 
              status: "已付款", 
              pay: "4.96", 
              fanyong: "0.67", 
              percent: "30.00%", 
              fukuan_time: "2019-10-26 21:21:49", 
              yg_souru: "1.49", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "苔知趣海苔夹心脆儿童即食芝麻夹心海苔罐装紫菜宝宝营养网红零食", 
              price: "14.80", 
              no: "682276931934830080", 
              status: "已付款", 
              pay: "4.96", 
              fanyong: "0.67", 
              percent: "30.00%", 
              fukuan_time: "2019-10-26 21:21:49", 
              yg_souru: "1.49", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "除蟑螂药克星家用无毒神器厨房一窝端强力捕捉器灭杀小强饵剂贴屋", 
              price: "59.80", 
              no: "680891747806255052", 
              status: "已付款", 
              pay: "19.80", 
              fanyong: "0.18", 
              percent: "2.00%", 
              fukuan_time: "2019-10-25 22:04:07", 
              yg_souru: "0.40", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "蓝月亮洗手液芦荟精华滋润抑菌按压包邮家用家庭套装批发官网正品", 
              price: "21.90", 
              no: "680093827333054253", 
              status: "已付款", 
              pay: "14.80", 
              fanyong: "0.23", 
              percent: "3.53%", 
              fukuan_time: "2019-10-25 12:43:19", 
              yg_souru: "0.52", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "采词洋甘菊护手霜秋冬季不油腻补水嫩白防干裂保湿小甘菊家庭款", 
              price: "149.90", 
              no: "679657152320830080", 
              status: "已付款", 
              pay: "19.90", 
              fanyong: "5", 
              percent: "50.00%", 
              fukuan_time: "2019-10-25 11:11:22", 
              yg_souru: "9.95", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "达利园糕点牛角包芝士味1000g/箱休闲零食大礼包早餐手撕面包整箱", 
              price: "100.00", 
              no: "679915523414149324", 
              status: "已付款", 
              pay: "22.45", 
              fanyong: "2.02", 
              percent: "20.00%", 
              fukuan_time: "2019-10-25 10:48:21", 
              yg_souru: "4.49", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "达利园糕点牛角包牛油味1000g/箱酥软早餐手撕面包休闲零食大礼包", 
              price: "100.00", 
              no: "679915523414149324", 
              status: "已付款", 
              pay: "22.44", 
              fanyong: "2.02", 
              percent: "20.00%", 
              fukuan_time: "2019-10-25 10:48:21", 
              yg_souru: "4.49", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "蓝月亮芦荟抑菌洗手液500g*2瓶装滋润清洁 抵御干燥 家用香味持久", 
              price: "19.90", 
              no: "679915523414149324", 
              status: "已付款", 
              pay: "13.71", 
              fanyong: "0.13", 
              percent: "2.00%", 
              fukuan_time: "2019-10-25 10:48:21", 
              yg_souru: "0.28", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "采词洋甘菊护手霜秋冬季不油腻补水嫩白防干裂保湿小甘菊家庭款", 
              price: "149.90", 
              no: "678978400282830080", // 678978400282611762
              status: "已付款", 
              pay: "19.90", 
              fanyong: "5", 
              percent: "50.00%", 
              fukuan_time: "2019-10-24 20:03:55", 
              yg_souru: "9.95", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "MINISO名创优品故宫宫廷四季花语护手霜补水保湿秋冬季通用3支装", 
              price: "19.90", 
              no: "679204833846830080", 
              status: "已付款", 
              pay: "18.82", 
              fanyong: "0.37", 
              percent: "4.00%", 
              fukuan_time: "2019-10-24 19:56:03", 
              yg_souru: "0.75", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "【双11预售】兰蔻全新小黑瓶面部精华肌底液30ml修护肌肤淡化细纹", 
              price: "760.00", 
              no: "676928737447830080", 
              status: "已付款", 
              pay: "100.00", 
              fanyong: "0.00", 
              percent: "4.00%", 
              fukuan_time: "2019-10-23 09:46:54", 
              yg_souru: "4.00", 
              is_jiesuan: "否", 
              dingjing: "100.00"
          }, 
          {
              title: "[双11预售]欧莱雅安瓶面膜女玻尿酸原液精华补水保湿提亮淡细纹", 
              price: "339.00", 
              no: "675767297729830080", 
              status: "已付款", 
              pay: "40.00", 
              fanyong: "0.00", 
              percent: "4.00%", 
              fukuan_time: "2019-10-22 13:16:23", 
              yg_souru: "1.60", 
              is_jiesuan: "否", 
              dingjing: "40.00"
          }, 
          {
              title: "【10.21预售】薇诺娜旋转木马敏肌守护礼盒舒敏保湿特护霜50g*3支", 
              price: "352.00", 
              no: "674909441459984319", 
              status: "已付款", 
              pay: "50.00", 
              fanyong: "0.90", 
              percent: "4.00%", 
              fukuan_time: "2019-10-21 21:26:29", 
              yg_souru: "2.00", 
              is_jiesuan: "否", 
              dingjing: "50.00"
          }, 
          {
              title: "【双11预售】薇诺娜舒敏保湿润肤水2件套 敏感肌爽肤水补水", 
              price: "168.00", 
              no: "674899329964984319", 
              status: "已付款", 
              pay: "20.00", 
              fanyong: "0.36", 
              percent: "4.00%", 
              fukuan_time: "2019-10-21 21:24:15", 
              yg_souru: "0.80", 
              is_jiesuan: "否", 
              dingjing: "20.00"
          }, 
          {
              title: "【双11预售】薇诺娜清透防晒乳SPF48 男女学生户外防紫外线", 
              price: "84.00", 
              no: "674954563120984319", 
              status: "已付款", 
              pay: "10.00", 
              fanyong: "0.18", 
              percent: "4.00%", 
              fukuan_time: "2019-10-21 21:21:20", 
              yg_souru: "0.40", 
              is_jiesuan: "否", 
              dingjing: "10.00"
          }, 
          {
              title: "【双11预售】薇诺娜舒敏保湿修护精华液2件套 修护皮肤屏障", 
              price: "268.00", 
              no: "674535619402984319", 
              status: "已付款", 
              pay: "30.00", 
              fanyong: "0.54", 
              percent: "4.00%", 
              fukuan_time: "2019-10-21 16:42:55", 
              yg_souru: "1.20", 
              is_jiesuan: "否", 
              dingjing: "30.00"
          }, 
          {
              title: "[双11预售]欧莱雅紫熨斗眼霜女抗皱紧致淡化细纹黑眼圈眼袋正品", 
              price: "306.00", 
              no: "563019366499349091", 
              status: "已付款", 
              pay: "40.00", 
              fanyong: "0.72", 
              percent: "4.00%", 
              fukuan_time: "2019-10-21 13:26:34", 
              yg_souru: "1.60", 
              is_jiesuan: "否", 
              dingjing: "40.00"
          }, 
          {
              title: "koli美容仪李佳琦推荐家用精华导入仪脸部导出洗脸清洁面部按摩仪", 
              price: "398.00", 
              no: "673286562273112640", 
              status: "已付款", 
              pay: "128.00", 
              fanyong: "20.36", 
              percent: "30.01%", 
              fukuan_time: "2019-10-20 23:12:22", 
              yg_souru: "38.41", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "洁婷透气棉柔卫生巾日用60夜用24迷你12片整箱批发姨妈巾日夜组合", 
              price: "118.00", 
              no: "670366784177830080", 
              status: "已结算", 
              pay: "39.90", 
              fanyong: "4.22", 
              percent: "20.00%", 
              fukuan_time: "2019-10-19 09:16:08", 
              yg_souru: "7.98", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "甘肃天水花牛苹果水果新鲜当季整箱10斤包邮应季红蛇果粉面丑现季", 
              price: "129.00", 
              no: "670169891845112640", 
              status: "已付款", 
              pay: "22.80", 
              fanyong: "0.50", 
              percent: "5.00%", 
              fukuan_time: "2019-10-18 19:40:43", 
              yg_souru: "1.14", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "丹夫华夫饼蛋香味400g营养早餐蛋糕手撕面包网红休闲小零食品整箱", 
              price: "59.00", 
              no: "668951554730984319", 
              status: "已结算", 
              pay: "29.90", 
              fanyong: "4.04", 
              percent: "30.00%", 
              fukuan_time: "2019-10-17 22:43:46", 
              yg_souru: "8.97", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "特典菊花茶金丝皇菊黄菊一朵一杯花茶大搭枸杞胎菊贡菊金银花茶叶", 
              price: "188.00", 
              no: "667872993303162335", 
              status: "已付款", 
              pay: "9.90", 
              fanyong: "2.23", 
              percent: "50.00%", 
              fukuan_time: "2019-10-17 09:33:11", 
              yg_souru: "4.95", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "特典菊花茶金丝皇菊黄菊一朵一杯花茶大搭枸杞胎菊贡菊金银花茶叶", 
              price: "188.00", 
              no: "667836835920387746", 
              status: "已付款", 
              pay: "9.90", 
              fanyong: "2.23", 
              percent: "50.00%", 
              fukuan_time: "2019-10-17 09:10:41", 
              yg_souru: "4.95", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "丸颜堂红豆薏米芡实茶赤小豆薏仁枸杞苦荞大麦花茶养生茶男女组合", 
              price: "130.00", 
              no: "666664258998149324", 
              status: "已结算", 
              pay: "19.90", 
              fanyong: "6.27", 
              percent: "70.01%", 
              fukuan_time: "2019-10-16 11:58:11", 
              yg_souru: "13.93", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "RIO锐澳3度微醺乳酸菌口味330ml*6罐果酒洋酒预调鸡尾酒套装", 
              price: "84.00", 
              no: "566950381011705921", 
              status: "已结算", 
              pay: "78.00", 
              fanyong: "1.40", 
              percent: "4.00%", 
              fukuan_time: "2019-10-15 22:18:29", 
              yg_souru: "3.12", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "协和维生素e乳老牌国货正品ve乳保湿乳液护肤身体乳补水维生素e霜", 
              price: "99.90", 
              no: "666046241276850262", 
              status: "已付款", 
              pay: "29.90", 
              fanyong: "4.04", 
              percent: "30.01%", 
              fukuan_time: "2019-10-15 20:57:36", 
              yg_souru: "8.97", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "卫生间置物架壁挂洗手间毛巾架不锈钢免打孔浴室淋浴房厕所壁挂件", 
              price: "38.00", 
              no: "663113410380054253", 
              status: "已结算", 
              pay: "13.89", 
              fanyong: "0.32", 
              percent: "5.11%", 
              fukuan_time: "2019-10-14 00:38:52", 
              yg_souru: "0.71", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "韩国AMORTALS尔木萄心悦美妆蛋不吃粉粉扑海绵蛋化妆蛋林允两个装", 
              price: "70.00", 
              no: "561354310026349091", 
              status: "已结算", 
              pay: "26.46", 
              fanyong: "0.57", 
              percent: "4.00%", 
              fukuan_time: "2019-10-13 23:26:12", 
              yg_souru: "1.05", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "穿衣镜壁挂镜子全身粘贴试衣镜贴墙镜子舞蹈镜宿舍拼接镜化妆镜子", 
              price: "57.80", 
              no: "659659904552054253", 
              status: "已结算", 
              pay: "19.90", 
              fanyong: "0.49", 
              percent: "5.50%", 
              fukuan_time: "2019-10-11 19:54:25", 
              yg_souru: "1.09", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "家用衣架宿舍用学生收纳神器儿童衣撑衣挂撑子晒晾凉衣服架子挂钩", 
              price: "18.30", 
              no: "658919136186054253", 
              status: "已结算", 
              pay: "9.90", 
              fanyong: "0.29", 
              percent: "6.50%", 
              fukuan_time: "2019-10-11 11:01:42", 
              yg_souru: "0.64", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "墙纸自粘背景壁纸砖纹块3d立体防水男女孩大学生宿舍卧室温馨10米", 
              price: "9.90", 
              no: "658908096580054253", 
              status: "已结算", 
              pay: "9.90", 
              fanyong: "0.07", 
              percent: "1.50%", 
              fukuan_time: "2019-10-11 10:58:19", 
              yg_souru: "0.15", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "小迷糊去角质慕斯面部清洁毛孔去死皮脸部全身去黑头磨砂膏男女", 
              price: "179.90", 
              no: "658987011782704140", 
              status: "已结算", 
              pay: "19.90", 
              fanyong: "3.58", 
              percent: "40.00%", 
              fukuan_time: "2019-10-11 09:19:21", 
              yg_souru: "7.96", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "六胜肽烟酰胺美颈霜", 
              price: "109.00", 
              no: "657486274929850262", 
              status: "已结算", 
              pay: "29.00", 
              fanyong: "6.53", 
              percent: "50.00%", 
              fukuan_time: "2019-10-10 10:34:15", 
              yg_souru: "14.50", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "老管家洗衣机槽清洗剂清洁污渍家用滚筒全自动除垢非杀菌消毒神器", 
              price: "28.00", 
              no: "565702476834872910", 
              status: "已结算", 
              pay: "12.80", 
              fanyong: "0.14", 
              percent: "2.50%", 
              fukuan_time: "2019-10-09 23:44:10", 
              yg_souru: "0.32", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "4分正三通三内丝带活接内外外6分全铜太阳能热水器管接头配件", 
              price: "11.40", 
              no: "656986528610054253", 
              status: "已结算", 
              pay: "5.70", 
              fanyong: "0.14", 
              percent: "5.60%", 
              fukuan_time: "2019-10-09 23:36:06", 
              yg_souru: "0.32", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "RIO锐澳3度微醺乳酸菌口味330ml*6罐果酒洋酒预调鸡尾酒套装", 
              price: "84.00", 
              no: "657035843510705921", 
              status: "已结算", 
              pay: "78.00", 
              fanyong: "1.40", 
              percent: "4.00%", 
              fukuan_time: "2019-10-09 21:09:30", 
              yg_souru: "3.12", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "【超值价】拉面说广式胡椒猪肚鸡方便速食非油炸拉面三盒装拉面", 
              price: "200.00", 
              no: "560139364436349091", 
              status: "已结算", 
              pay: "42.90", 
              fanyong: "4.55", 
              percent: "20.00%", 
              fukuan_time: "2019-10-08 15:45:22", 
              yg_souru: "8.58", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "【超值价】甘肃天水花牛苹果水果新鲜当季带箱10斤应季红蛇果粉面丑现季萍果", 
              price: "129.00", 
              no: "653079872230112640", 
              status: "已收货", 
              pay: "19.80", 
              fanyong: "0.89", 
              percent: "10.00%", 
              fukuan_time: "2019-10-07 12:17:28", 
              yg_souru: "1.98", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "优云穿绳自动收口抽绳分类垃圾袋加厚可降解厨房家用手提式穿绳袋", 
              price: "10.90", 
              no: "653213793750830080", 
              status: "已结算", 
              pay: "3.80", 
              fanyong: "0.00", 
              percent: "30.50%", 
              fukuan_time: "2019-10-07 11:50:09", 
              yg_souru: "1.16", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "2送1金丝皇菊大菊花茶一朵一杯茶叶黄菊胎菊贡菊可搭枸杞金银花茶", 
              price: "50.00", 
              no: "649308385633830080", 
              status: "已结算", 
              pay: "5.10", 
              fanyong: "0.00", 
              percent: "50.00%", 
              fukuan_time: "2019-10-04 10:47:45", 
              yg_souru: "2.55", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "RIO锐澳3度微醺全家福7口味330ml*8罐果酒洋酒预调鸡尾酒套装", 
              price: "104.00", 
              no: "563631150216705921", 
              status: "已结算", 
              pay: "52.00", 
              fanyong: "0.94", 
              percent: "4.00%", 
              fukuan_time: "2019-10-03 00:13:49", 
              yg_souru: "2.08", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "RIO锐澳微醺乳酸菌伏特加鸡尾酒套装330ml*8罐预调酒洋酒组合果酒", 
              price: "139.00", 
              no: "563623630599705921", 
              status: "已结算", 
              pay: "44.90", 
              fanyong: "0.54", 
              percent: "2.70%", 
              fukuan_time: "2019-10-02 23:56:37", 
              yg_souru: "1.21", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "[深圳世界之窗-大门票]世界之窗日场门票(全日票含夜场)", 
              price: "203.00", 
              no: "647176705815284751", 
              status: "已结算", 
              pay: "609.00", 
              fanyong: "1.23", 
              percent: "0.45%", 
              fukuan_time: "2019-10-02 15:33:25", 
              yg_souru: "2.74", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "超大号搬家纸箱五层特硬加厚特大收纳纸箱搬家用纸箱打包快递箱子", 
              price: "10.80", 
              no: "645639489320054253", 
              status: "已结算", 
              pay: "5.69", 
              fanyong: "0.25", 
              percent: "9.75%", 
              fukuan_time: "2019-10-01 11:56:30", 
              yg_souru: "0.55", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "长沙特大搬家纸箱子定做物流邮政淘宝快递纸盒收纳纸箱子批发包邮", 
              price: "12.98", 
              no: "645643521043054253", 
              status: "已结算", 
              pay: "7.83", 
              fanyong: "0.23", 
              percent: "6.50%", 
              fukuan_time: "2019-10-01 11:54:29", 
              yg_souru: "0.51", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "拜格刀具套装厨房全套不锈钢锋利家用切菜斩切肉刀水果刀厨师菜刀", 
              price: "499.00", 
              no: "558738372174349091", 
              status: "已结算", 
              pay: "39.90", 
              fanyong: "6.3", 
              percent: "19.50%", 
              fukuan_time: "2019-10-01 11:01:06", 
              yg_souru: "7.78", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "宿舍收纳箱塑料大号衣服储物箱家用车载整理箱玩具书本收纳盒子", 
              price: "198.00", 
              no: "644176608267054253", 
              status: "已结算", 
              pay: "89.00", 
              fanyong: "1.30", 
              percent: "3.25%", 
              fukuan_time: "2019-09-30 10:03:11", 
              yg_souru: "2.89", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "2019新茶正山小种红茶茶叶特级浓香型散装红茶150g罐装礼盒装春茶", 
              price: "218.00", 
              no: "558387780022120393", 
              status: "已结算", 
              pay: "6.90", 
              fanyong: "1.21", 
              percent: "39.00%", 
              fukuan_time: "2019-09-29 10:55:20", 
              yg_souru: "2.69", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "【焕新价】辉柏嘉官方旗舰店官网48色水溶彩铅德国72色水溶性彩色铅笔专业手绘120色红辉初学者画画成人学生用绘画套装", 
              price: "63.60", 
              no: "642518113762284751", 
              status: "已结算", 
              pay: "57.25", 
              fanyong: "0.33", 
              percent: "1.30%", 
              fukuan_time: "2019-09-28 16:45:46", 
              yg_souru: "0.74", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "志高泡脚桶洗脚盆电动按摩家用足浴盆全自动加热恒温神器吴昕同款", 
              price: "469.00", 
              no: "562149902943984319", 
              status: "已结算", 
              pay: "149.00", 
              fanyong: "8.72", 
              percent: "13.00%", 
              fukuan_time: "2019-09-28 13:01:16", 
              yg_souru: "19.37", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "男士袜子中筒袜隐形船袜短袜运动袜夏季薄款黑白色纯色透气潮ins", 
              price: "25.90", 
              no: "641975872469500545", 
              status: "已付款", 
              pay: "11.90", 
              fanyong: "1.39", 
              percent: "26.00%", 
              fukuan_time: "2019-09-28 11:23:39", 
              yg_souru: "3.09", 
              is_jiesuan: "否", 
              dingjing: "0.00"
          }, 
          {
              title: "俏侬披萨饼底6个自制披萨皮胚酱半成品6/8/9寸家用烘焙原材料套餐", 
              price: "28.00", 
              no: "558160006526349091", 
              status: "已结算", 
              pay: "20.80", 
              fanyong: "0.20", 
              percent: "0.97%", 
              fukuan_time: "2019-09-27 15:15:33", 
              yg_souru: "0.20", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "爱奇艺vip会员12个月官方直充视频会员不支持TV端", 
              price: "198.00", 
              no: "640906208705416243", 
              status: "已结算", 
              pay: "118.00", 
              fanyong: "10.35", 
              percent: "19.50%", 
              fukuan_time: "2019-09-27 12:30:14", 
              yg_souru: "23.01", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "皮皮猴车载纸巾盒汽车抽纸盒车内用挂式车上创意卡通扶手箱餐巾纸", 
              price: "50.00", 
              no: "640976099095830080", 
              status: "已结算", 
              pay: "19.80", 
              fanyong: "3.15", 
              percent: "19.50%", 
              fukuan_time: "2019-09-27 11:17:39", 
              yg_souru: "3.86", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "幼儿早期阅读与识字幼小衔接全套6册学龄前儿童认字0-3-5-6岁拼音教材幼儿园启蒙早教书大班升一年级幼儿宝宝识字大王", 
              price: "58.80", 
              no: "618998561672770376", 
              status: "已结算", 
              pay: "29.90", 
              fanyong: "0.06", 
              percent: "0.45%", 
              fukuan_time: "2019-09-11 14:58:12", 
              yg_souru: "0.13", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "家用不沾油加厚洗碗海绵厨房刷锅神器不伤锅双面清洁百洁布海绵擦", 
              price: "20.00", 
              no: "612273889337984319", 
              status: "已结算", 
              pay: "6.80", 
              fanyong: "0.00", 
              percent: "6.00%", 
              fukuan_time: "2019-09-07 16:41:30", 
              yg_souru: "0.41", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }, 
          {
              title: "心相印无芯卷纸竹派竹π纸巾3层70克36卷家用本色厕纸整箱实惠装", 
              price: "79.90", 
              no: "610782208257284751", 
              status: "已结算", 
              pay: "29.90", 
              fanyong: "0.61", 
              percent: "4.50%", 
              fukuan_time: "2019-09-06 14:51:25", 
              yg_souru: "1.35", 
              is_jiesuan: "是", 
              dingjing: "0.00"
          }
      ],
      currentName: '',
      memberList: [],
      jsonList: []
    }
  },
  watch: {
  },
  mounted() {
    this.init()
  },
  methods: {
    init () {
      this.getList()
    },
    getList () {
      axios({
        method: 'post',
        url: 'http://www.ilove03.com/api/getOrderList',
        responseType: 'json',
        data: {}
      }).then(response => {
        console.log(response, 'success')
        this.orderList = response.data.result
      }).catch(e => {
      })
    },
    toAdd() {
      this.$router.push('/member')
    },
    /**
     * 客户信息导入
     */
    exportExcel2(e) {
      var self = this
      var files = e.target.files
      // var rABS = false
      var fileReader = new FileReader()
      fileReader.onload = function(ev) {
        try {
          var data = ev.target.result,
            workbook = XLSX.read(data, {
              type: "binary"
            }), // 以二进制流方式读取得到整份excel表格对象
            persons = [] // 存储获取到的数据
        } catch (e) {
          console.error(e)
          self.$message.error("文件类型不正确")
          return
        }
        var exportList = JSON.parse(
          JSON.stringify(
            XLSX.utils.sheet_to_json(workbook.Sheets[workbook.SheetNames[0]])
          )
        )
        console.log(exportList, 'exportList')
        var jsonList = []
        if (exportList.length > 0) {
          jsonList = exportList.map((item, index) => {
            return {
              title: item["商品标题"],
              price: item["商品单价"],
              no: item["淘宝订单编号"],
              status: item["订单状态"],
              pay: item["付款金额"],
              fanyong: (item["付款预估收入"] * 0.5).toFixed(2),
              percent: item["收入比率"],
              fukuan_time: item["付款时间"],
              yg_souru: item["付款预估收入"],
              is_jiesuan:  '0',
              dingjing: item["定金付款金额"]
            }
          }).filter(v => {
            return v.no.substr(12, 6) !== '887199' && v.status !== '已失效'
          })
        }
        self.jsonList = self.jsonList.concat(jsonList)
      }
      // 以二进制方式打开文件
      fileReader.readAsBinaryString(files[0])
      // console.log('导入表格',e)
      e.target.value = ""
    },
    /**
     * 根据编号对应客户
     */
    filterMember(item) {
      this.memberList = this.orderList.filter(v => {
        return v.no.substr(12, 6) === item.bianhao && v.fanyong !== '0.00'
      })
      this.currentName = item.name
      this.modalTag = true
      console.log("filterMember", this.modalTag, this.memberList)
    },
    /**
     * 求最高价全票
     */
    filterDefault() {
      let arr = this.allTravelList.map(v => {
        return {
          Commission: v.Commission,
          Passwords: v.Passwords,
          couponSum: v.priceInfo[0].unitprice
        }
      })
      let index = 0
      console.log("最高价全票arr", arr, this.allTravelList)
      var num = arr[0].couponSum
      for (var i = 0; i < arr.length; i++) {
        if (arr[i].couponSum > num) {
          num = arr[i].couponSum
          index = i
        }
      }
      return {
        Commission: arr[index].Commission,
        Passwords: arr[index].Passwords,
        ruleName: "默认",
        couponSum: arr[index].couponSum,
        couponPrice: ""
      }
    }
  }
}
</script>

<style lang="less" scoped>
@import "../../assets/less/booking.less";
.page {
  &-title {
    .el-form-item {
      margin-bottom: 0;
    }
    .btn_file {
      // padding-left: 58px;
      .el-button {
        width: 120px;
        height: 45px;
        span {
          vertical-align: middle;
          i {
            margin-right: 5px;
            vertical-align: middle;
          }
        }
      }
    }
  }
  .flex_check_ct {
    display: inline-block;
    margin-right: 20px;
    // width: 80px;
    // flex: 1;
  }
  .el-form {
    height: 100%;
  }
  .select {
    padding: 0.3rem 1.3rem 0.3rem 0.3rem;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    .ellipsis {
      display: -webkit-box;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: break-all;
      -webkit-box-orient: vertical !important;
      -webkit-line-clamp: 1;
    }
    &_title {
      min-width: 200px;
      font-size: 12px;
    }
    i {
      top: 2px;
    }
    ul {
      top: 37px;
    }
  }
  .page-content {
    padding-bottom: 130px;
  }
  .cus_form {
    margin-bottom: 0px;
    margin-left: -130px;
  }
  .table_wrap {
    overflow-x: auto;
  }
  .table-order {
    > thead > tr > th {
      box-sizing: border-box;
    }
    > tbody > tr:nth-of-type(odd) {
      background-color: #fff;
    }
    > tbody > tr:nth-of-type(even) {
      background-color: #eeecec;
    }
    .el-form-item {
      margin-bottom: 0;
    }
    .ct {
      display: inline-block;
      min-width: 40px;
      &.empty{
        background: red;
      }
      .zhutu{
        width: 100px;
      }
    }
    .el-input {
      height: 36px;
      input {
        height: 100%;
      }
    }
    .el-dropdown {
      font-size: 1.1rem;
    }
  }
  .table-order-hover {
    > tbody > tr:hover {
      background-color: rgb(241, 241, 241);
    }
  }
  .add-order {
    margin: 1rem auto;
    color: #37b0eb;
    font-size: 25px;
    text-align: center;
    cursor: pointer;
    .el-button--large {
      padding: 12px 60px;
    }
  }
  .file_box {
    display: inline-block;
    position: relative;
    font-weight: 500;
    height: 45px;
    width: 120px;
    text-align: center;
    font-size: 14px;
    line-height: 45px;
    border-radius: 4px;
    overflow: hidden;
    color: #1eb1b1;
    background: #e0f7f7;
    border: 1px solid #1eb1b1;
    cursor: pointer;
    vertical-align: middle;
    i:hover {
      color: #fff;
    }
    &:hover {
      color: #fff;
      background-color: #1eb1b1;
      border-color: #1eb1b1;
      cursor: pointer;
    }
  }
  .file_box1 {
    margin: 0 20px 0 0px;
    i {
      font-size: 26px;
      color: #1b8a4e;
      vertical-align: middle;
      margin-right: 5px;
    }
  }
  .file_box2 {
    a {
      display: block;
      width: 100%;
      height: 100%;
      &:hover {
        color: #fff;
      }
    }
  }
  .file-btn {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    outline: none;
    background-color: transparent;
    filter: alpha(opacity=0);
    -moz-opacity: 0;
    -khtml-opacity: 0;
    opacity: 0;
    cursor: pointer;
  }
}
.el-dropdown-menu {
  max-height: 300px;
  overflow-y: auto;
}
.el-form-item__error {
  top: 0;
  height: 17px;
}
.el-dropdown {
  width: 100%;
  &-link {
    width: 90%;
    line-height: 40px;
    i {
      position: absolute;
      top: 13px;
      right: 0;
    }
  }
}
.ellipsis {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1;
}
</style>
